//
//  DataManager.m
//  Khmer media
//
//  Created by Rainseylong on 2/12/13.
//  Copyright (c) 2013 imer. All rights reserved.
//

#import "DataManager.h"
#import "AudioStreamer.h"
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>

@implementation DataManager
SYNTHESIZE_SINGLETON_FOR_CLASS(DataManager)

@synthesize urlForPlayMusic;
@synthesize productionName;
@synthesize albumeName;
@synthesize streamer;

-(void)startStreamerWithURL:(NSURL *)songURL
{
    self.streamer=[[AudioStreamer alloc] initWithURL:songURL];
    //Make sure the system follows our playback status
    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
    [[AVAudioSession sharedInstance] setActive: YES error: nil];
}

@end
